<div navbar ng-init="currentItem='service'"></div>
<div ng-show="Auth.processing||!loaded"><div loading></div></div>

<div id="main" ng-show="!Auth.processing&&loaded" style="display:none">
	<div class="module-header">
		<h3>服务管理</h3>
	</div>

	<div class="tabbable" ng-init="loadInfo('service.**')">
		<ul class="nav nav-tabs">
			<li ng-class="'active' | iftrue:activeTabName=='http'"><a href="#http" ng-click="sec('http')" data-toggle="tab">HTTP</a></li>
			<li ng-class="'active' | iftrue:activeTabName=='ftp'"><a href="#ftp" ng-click="sec('ftp')" data-toggle="tab">FTP</a></li>
			<li ng-class="'active' | iftrue:activeTabName=='database'"><a href="#database" ng-click="sec('database')" data-toggle="tab">数据库</a></li>
			<li ng-class="'active' | iftrue:activeTabName=='appengine'"><a href="#appengine" ng-click="sec('appengine')" data-toggle="tab">脚本引擎</a></li>
			<li ng-class="'active' | iftrue:activeTabName=='application'"><a href="#application" ng-click="sec('application')" data-toggle="tab">应用程序</a></li>
			<li ng-class="'active' | iftrue:activeTabName=='mail'"><a href="#mail" ng-click="sec('mail')" data-toggle="tab">邮件</a></li>
			<li ng-class="'active' | iftrue:activeTabName=='system'"><a href="#system" ng-click="sec('system')" data-toggle="tab">系统</a></li>
		</ul>
		<div class="tab-content">
			<div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='http'" id="http">
				<table class="table">
					<thead>
						<tr><th colspan="4">HTTP 服务器软件</th></tr>
					</thead>
					<tbody>
						<tr>
							<td>Apache</td>
							<td ng-bind-html-unsafe="info['service.httpd']['status'] | service.status"></td>
							<td class="muted">广泛使用的开源 HTTP 服务器软件</td>
							<td><div srvminiop ng-init="name='Apache';service='httpd';urlname='apache'"></div></td>
						</tr>
						<tr>
							<td style="width:100px">Nginx</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.nginx']['status'] | service.status"></td>
							<td class="muted">高性能的开源 HTTP 服务器软件</td>
							<td style="width:150px"><div srvminiop ng-init="name='Nginx';service='nginx';urlname='nginx'"></div></td>
						</tr>
						<tr>
							<td style="width:100px">Tomcat</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.tomcat']['status'] | service.status"></td>
							<td class="muted">小型的轻量级 JSP 引擎应用</td>
							<td style="width:150px"><div srvminiop ng-init="name='Tomcat';service='tomcat';urlname='tomcat'"></div></td>
						</tr>
						<tr>
							<td style="width:100px">Lighttpd</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.lighttpd']['status'] | service.status"></td>
							<td class="muted">快速灵活高性能的开源 HTTP 服务器软件</td>
							<td style="width:150px"><div srvminiop ng-init="name='Lighttpd';service='lighttpd';urlname='lighttpd'"></div></td>
						</tr>
						<tr>
							<td style="width:100px">Tengine</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.tengine']['status'] | service.status"></td>
							<td class="muted">基于 Nginx 的高效稳定安全的 HTTP 服务器软件</td>
							<td style="width:150px"><div srvminiop ng-init="name='Tengine';service='tengine';urlname='tengine'"></div></td>
						</tr>
					</tbody>
				</table>
			</div>
			<div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='ftp'" id="ftp">
				<table class="table">
					<thead>
						<tr><th colspan="4">FTP 服务器软件</th></tr>
					</thead>
					<tbody>
						<tr>
							<td style="width:100px">vsftpd</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.vsftpd']['status'] | service.status"></td>
							<td class="muted">安全快速的 FTP 服务器</td>
							<td style="width:150px"><div srvminiop ng-init="name='vsftpd';service='vsftpd';urlname='vsftpd'"></div></td>
						</tr>
						<tr>
							<td style="width:100px">ProFTPD</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.proftpd']['status'] | service.status"></td>
							<td class="muted">安全简单的 FTP 服务器</td>
							<td style="width:150px"><div srvminiop ng-init="name='proftpd';service='proftpd';urlname='proftpd'"></div></td>
						</tr>
						<tr>
							<td style="width:100px">Pure-FTPd</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.pure-ftpd']['status'] | service.status"></td>
							<td class="muted">快速稳定全功能的 FTP 服务器</td>
							<td style="width:150px"><div srvminiop ng-init="name='Pure-FTPd';service='pure-ftpd';urlname='pureftpd'"></div></td>
						</tr>
					</tbody>
				</table>
			</div>
			<div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='database'" id="database">
				<table class="table">
					<thead>
						<tr><th colspan="4">数据库服务</th></tr>
					</thead>
					<tbody>
						<tr>
                            <td style="width:100px">MariaDB</td>
                            <td style="width:60px" ng-bind-html-unsafe="info['service.mariadb']['status'] | service.status"></td>
                            <td class="muted">MySQL的一个分支，主要由开源社区在维护</td>
                            <td style="width:150px"><div srvminiop ng-init="name='MariaDB';service='mariadb';urlname='mariadb'"></div></td>
                        </tr>
                        <tr>
							<td>MySQL</td>
							<td ng-bind-html-unsafe="info['service.mysqld']['status'] | service.status"></td>
							<td class="muted">最流行的开源关系型数据库服务器</td>
							<td><div srvminiop ng-init="name='MySQL';service='mysqld';urlname='mysql'"></div></td>
						</tr>
						<tr>
							<td>Redis</td>
							<td ng-bind-html-unsafe="info['service.redis']['status'] | service.status"></td>
							<td class="muted">高性能内存数据库</td>
							<td><div srvminiop ng-init="name='Redis';service='redis';urlname='redis'"></div></td>
						</tr>
						<tr>
							<td>Memcache</td>
							<td ng-bind-html-unsafe="info['service.memcached']['status'] | service.status"></td>
							<td class="muted">内存数据库</td>
							<td><div srvminiop ng-init="name='Memcache';service='memcached';urlname='memcache'"></div></td>
						</tr>
						<tr>
							<td>MongoDB</td>
							<td ng-bind-html-unsafe="info['service.mongod']['status'] | service.status"></td>
							<td class="muted">分布式高性能的数据库服务器</td>
							<td><div srvminiop ng-init="name='MongoDB';service='mongod';urlname='mongodb'"></div></td>
						</tr>
					</tbody>
				</table>
			</div>
			<div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='appengine'" id="appengine">
				<table class="table">
					<thead>
						<tr><th colspan="4">应用/脚本引擎</th></tr>
					</thead>
					<tbody>
						<tr>
							<td style="width:100px">PHP</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.php-fpm']['status'] | service.status"></td>
							<td class="muted">PHP 脚本解析器</td>
							<td style="width:150px"><div srvminiop ng-init="name='PHP';service='php-fpm';urlname='php'"></div></td>
						</tr>
					</tbody>
				</table>
			</div>
			<div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='application'" id="application">
				<table class="table">
					<thead>
						<tr><th colspan="4">应用程序</th></tr>
					</thead>
					<tbody>
						<tr>
							<td style="width:100px">Shadowsocks</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.shadowsocks-libev']['status'] | service.status"></td>
							<td class="muted">libev 版 - 内存占用小（600k左右），低 CPU 消耗</td>
							<td style="width:150px">
								<a class="btn btn-default btn-sm" role="button" href="#/service?s=application" disabled>正在开发</a>
								<!-- <div srvminiop ng-init="name='Shadowsocks-libev';service='shadowsocks-libev';urlname='shadowsocks-libev'"></div> -->
							</td>
						</tr>
						<tr>
							<td style="width:100px">Shadowsocks</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.shadowsocks']['status'] | service.status"></td>
							<td class="muted">Python 版</td>
							<td style="width:150px">
								<a class="btn btn-default btn-sm" role="button" href="#/service?s=application" disabled>正在开发</a>
								<!-- <div srvminiop ng-init="name='Shadowsocks';service='shadowsocks';urlname='shadowsocks'"></div> -->
							</td>
						</tr>
						<tr>
							<td style="width:100px">ShadowsocksR</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.shadowsocks']['status'] | service.status"></td>
							<td class="muted">ShadowsocksR - SOCKS 代理服务器</td>
							<td style="width:150px">
								<a class="btn btn-default btn-sm" role="button" href="#/service?s=application" disabled>正在开发</a>
								<!-- <div srvminiop ng-init="name='ShadowsocksR';service='shadowsocks';urlname='shadowsocks'"></div> -->
							</td>
						</tr>
					</tbody>
				</table>
			</div>
			<div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='mail'" id="mail">
				<table class="table">
					<thead>
						<tr><th colspan="4">邮件服务</th></tr>
					</thead>
					<tbody>
						<tr>
							<td style="width:100px">Sendmail</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.sendmail']['status'] | service.status"></td>
							<td class="muted">邮件传输服务</td>
							<td style="width:150px"><div srvminiop ng-init="name='Sendmail';service='sendmail';urlname='sendmail'"></div></td>
						</tr>
					</tbody>
				</table>
			</div>
			<div class="tab-pane" ng-class="'active' | iftrue:activeTabName=='system'" id="system">
				<table class="table">
					<thead>
						<tr><th colspan="4">系统服务</th></tr>
					</thead>
					<tbody>
						<tr>
							<td style="width:100px">SSH</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.sshd']['status'] | service.status"></td>
							<td class="muted">远程连接服务器</td>
							<td style="width:150px"><div srvminiop ng-init="name='SSH';service='sshd';urlname='ssh'"></div></td>
						</tr>
						<tr>
							<td>iptables</td>
							<td ng-bind-html-unsafe="info['service.iptables']['status'] | service.status"></td>
							<td class="muted">Linux 防火墙</td>
							<td><div srvminiop ng-init="name='iptables';service='iptables';urlname='iptables'"></div></td>
						</tr>
						<tr>
							<td>Cron</td>
							<td ng-bind-html-unsafe="info['service.crond']['status'] | service.status"></td>
							<td class="muted">定时任务管理服务器</td>
							<td><div srvminiop ng-init="name='Cron';service='crond';urlname='cron'"></div></td>
						</tr>
						<tr>
							<td style="width:100px">named</td>
							<td style="width:60px" ng-bind-html-unsafe="info['service.named']['status'] | service.status"></td>
							<td class="muted">DNS 域名解析服务器</td>
							<td style="width:100px">
								<div srvminiop ng-init="name='named';service='named';urlname='named'"></div>
							</td>
						</tr>
						<tr style="display:none" ng-show="info['server.virt'] != 'Virtuozzo/OpenVZ'">
							<td>NTP</td>
							<td ng-bind-html-unsafe="info['service.ntpd']['status'] | service.status"></td>
							<td class="muted">时间同步服务</td>
							<td><div srvminiop ng-init="name='NTP';service='ntpd';urlname='ntp'"></div></td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
